char p[9];main(i){for(gets(p),i=0;~scanf("%8s",p);printf(++i%4?"%d.":"%d\n",strtol(p,0,2)));}
